package com.aaa.service.impl;

import com.aaa.dao.OrderDao;
import com.aaa.dao.impl.OrderDaoImpl;
import com.aaa.entity.Order;
import com.aaa.service.OrderService;

import java.util.List;

public class UserServiceImpl implements OrderService {
    private OrderDao orderDao = new OrderDaoImpl();


    @Override
    public int updateOrderByOrderId(Order order) {
        return orderDao.updateOrderByOrderId(order);
    }

    @Override
    public int updateVerifyOrderByOrderId(Integer orderId, Integer status) {
        return orderDao.updateVerifyOrderByOrderId(orderId, status);
    }

    @Override
    public List<Order> findAllOrder(Integer pageNumber, Integer pageSize, Integer orderId, Integer cardId) {
        return orderDao.findAllOrder(pageNumber, pageSize, orderId, cardId);
    }

    @Override
    public List<Order> findOrderByOrderId(Integer orderId) {
        return orderDao.findOrderByOrderId(orderId);
    }

    @Override
    public List<Order> findOrderBySCardId(Integer cartId) {
        return orderDao.findOrderByCardId(cartId);
    }

    @Override
    public int getAllOrderInfoCount(Integer orderId, Integer cardId) {
        // 总页数
        return orderDao.getAllOrderInfoCount(orderId, cardId);
    }

}
